package com.android.memory;

import com.android.memory.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;

public class HighscoreActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        
        //Sets the layout
        setContentView(R.layout.highscore);

    }

    public void onStart() {
		super.onStart();
		//if music is on, then sets continueMusic to true
		if(OptionsActivity.musicPlayer)
			MusicManagerService.setContinueMusic(true);
	}
	
	public void onStop() {
		super.onStop();
		if(!MusicManagerService.getContinueMusic())
		{
	    	Intent backgroundmusic= new Intent(this, MusicManagerService.class);
			stopService(backgroundmusic);
		}
	}
	
	public void onPause() {
		super.onPause();
		MusicManagerService.setContinueMusic(false);
	}
	
	public void onResume() {
		super.onResume();
		if(OptionsActivity.musicPlayer) {
			MusicManagerService.setContinueMusic(true);
	    	Intent backgroundmusic= new Intent(this, MusicManagerService.class);
			startService(backgroundmusic);
		}
	}
	
	public void onDestroy() {
		super.onDestroy();
	}
}


